package com.zxl.grocery.microservice.admin;

import com.zxl.grocery.microservice.auth.client.EnableGroceryAuthClient;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.cloud.client.circuitbreaker.EnableCircuitBreaker;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.cloud.netflix.feign.EnableFeignClients;
import org.springframework.scheduling.annotation.EnableScheduling;

/**
 * @Author: zxl
 * @Description:
 * @Date: Created in 17:19 2017/10/12
 * @Modified By:
 */
@SpringBootApplication
//@EnableDiscoveryClient  //激活eureka中的DiscoveryClient实现；也可用于其它服务发现，比如（ZK，console等）
@EnableEurekaClient //明确用于eureka发现
@EnableCircuitBreaker
@EnableFeignClients({"com.zxl.grocery.microservice.auth.client.feign"})
@EnableScheduling
@EnableGroceryAuthClient
@ServletComponentScan("com.zxl.grocery.microservice.admin.config.druid")
public class AdminBootstarp {
    public static void main(String[] args) {
        new SpringApplicationBuilder(AdminBootstarp.class).web(true).run(args);
//        SpringApplication.run(AdminBootstarp.class,args);
    }
}
